<!DOCTYPE html>
<html lang = "en" >
<head >
	<meta charset = "UTF-8" >
	<title >Title</title >
	<script src = "js/jquery.min.js" ></script >
	<script src = "js/http.js" ></script >
</head >
<body >
<H1 >支付测试</H1 >
<hr >
<div class = "form-container" >
	<form action = "/netdisc/user/order/pay" id = "form" method = "post" >
		*商户订单 :
		<input name = "outTradeNo" type = "text" value = null ><br >
		*订单名称 :
		<input name = "subject" type = "text" value = "红魔手机" ><br >
		*付款金额 :
		<input name = "totalAmount" type = "text" value = "0.1" ><br >
		*商品描述 :
		<input name = "body" type = "text" value = "红魔手机 努比亚出品游戏手机" ><br >
		<input onclick = "submitForm('/netdisc/user/order/pay')" type = "button" value = "支付宝支付" >
	</form >
</div >
</body >

<script >
	function submitForm(action) {
		console.log(document.getElementById("form"));
		document.getElementById("form").action = action
		document.getElementById("form").submit()
		
		/*let outTradeNoVal = $("[name='outTradeNo']").val();
		let subjectVal = $("[name='subject']").val();
		let totalAmountVal = $("[name='totalAmount']").val();
		let bodyVal = $("[name='body']").val();
		
		let alipayOrderQO = JSON.stringify({
			outTradeNo: outTradeNoVal,
			subject: subjectVal,
			totalAmount: totalAmountVal,
			body: bodyVal
		});
		
		$.ajax({
			type: "post",
			url: "http://localhost:8080/netdisc_user/order/pay",
			data: alipayOrderQO,
			contentType: "application/json",
			success: function(resp) {
				console.log(resp)
				$("body").innerHTML = resp;
			}
		})*/
		
	}
</script >

<style >
	.form-container {
		padding-top: 10px;
	}
	
	input {
		margin: 10px;
		
	}
</style >
</html >